import React, { Component,Fragment } from 'react';
import {Card,Button,message} from 'antd'
import './ui.less'
export default class Message extends Component {
    showMessage = (type) => {
        message[type]('恭喜你，React课程晋级成功.')
    }
    render() {
        return (
            <Fragment>
                <Card title="全局提示框" className="card-wrapper">
                    <Button type="primary" onClick={() => this.showMessage('success')}>Success</Button>
                    <Button type="primary" onClick={() => this.showMessage('info')}>Info</Button>
                    <Button type="primary" onClick={() => this.showMessage('warning')}>Warning</Button>
                    <Button type="primary" onClick={() => this.showMessage('error')}>Error</Button>
                    <Button type="primary" onClick={() => this.showMessage('loading')}>Loading</Button>
                </Card>
            </Fragment>
        )
    }
}